Embedded processors often execute code stored in a private memory (e.g., local storage). Executing code larger than a processor's private memory requires a strategy for swapping pieces of code (code segments) into the private memory before use. In some cases, a code segment may include a branch instruction whose target instruction is located in a different code segment. Each time an instruction cache manager retrieves and stores code, the instruction cache manager identifies a location from which to retrieve the code in a backing storage area along with a location in an instruction cache area to store the code.